package com.icode.core.page;

/**
 * User: alexz
 * Date: 2015/10/19
 * Time: 17:40
 */
public abstract class AbstractPager<T> implements Pager<T> {

    @Override
    public int getSize() {
        int total = getTotal();
        int sizePerPage = getSizePerPage();
        return total % sizePerPage == 0 ? total / sizePerPage : (total / sizePerPage) + 1;
    }
}
